package com.lyz.dataStructure.algorithm.zijietiaodong2020;/**
 * @Author:759057893@qq.com Lyz
 * @Date: ${Date} 20:30
 * @Description:
 **/

import java.util.Scanner;

/**
 *@Author:759057893@qq.com Lyz
 *@Date: 2019/8/11 20:30
 *@Description:
 **/
public class Main4 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N =sc.nextInt();
        int[] year = new int[N];
        for(int i =0;i<N;i++){
            year[i] = sc.nextInt();
        }
        int min =0;
        int max = 0;
        int index = year[0];
        int[] money =new int[N];
        money[0] =100;
        int sum = 0;
        for (int i =1;i<year.length-1;i++){
            if(year[i]>year[i-1]){
                money[i] = money[i-1]+100;
                money[i+1] = money[i]+100;
            }else if(year[i]<year[i-1]){
                money[i]+=100;
                if(year[i+1]>year[i]){
                    money[i] = money[i-1]-100;
                    money[i+1] = money[i]+100;
                } else if(year[i+1]<year[i]&&(money[i]==100)){
                    money[i-1] +=100;
                    money[i] +=100;
                    money[i+1]  +=100;
                }
            }else {
                money[i] = money[i-1];
                money[i+1] = money[i];
            }
        }
        for(int i =0;i<money.length;i++){
            sum +=money[i];
        }
        System.out.println(sum);
    }
}
